Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
panel-plugins:xfce4-genmon-plugin:start [2023/04/19 15:54] – [Advanced Features] added images toz | panel-plugins:xfce4-genmon-plugin:start [2023/12/25 13:25] (current) – [Advanced Features] updated link toz | ||
---|---|---|---|
Line 5: | Line 5: | ||
* **[[# | * **[[# | ||
- | | + | * XML Tags |
+ | * Example Script | ||
+ | | ||
+ | * Pango Text Markup Support | ||
+ | * Refreshing the plugin | ||
+ | * Enhanced Gtk3 CSS Styling Capabilities | ||
* **[[# | * **[[# | ||
* **[[#Latest Release|Latest Release]]** | * **[[#Latest Release|Latest Release]]** | ||
Line 44: | Line 49: | ||
* Note: the < | * Note: the < | ||
* image changes with the icon theme | * image changes with the icon theme | ||
- | * supports panel' | + | * supports panel' |
* supports light/dark symbolic icon auto-colour changes | * supports light/dark symbolic icon auto-colour changes | ||
* **< | * **< | ||
Line 55: | Line 60: | ||
* Note: | * Note: | ||
* To hide the tooltip bubble, use an empty tool tag, eg: '' | * To hide the tooltip bubble, use an empty tool tag, eg: '' | ||
+ | * The tooltip will not display with a cycle of less than 0.5 (see: [[https:// | ||
* **< | * **< | ||
* Display a value-based progress bar on the plugin. | * Display a value-based progress bar on the plugin. | ||
Line 61: | Line 67: | ||
* **< | * **< | ||
* This tag will allow the embedding of css tweaks directly into the plugin. | * This tag will allow the embedding of css tweaks directly into the plugin. | ||
- | * eg. '' | + | * eg. '' |
* Result: {{: | * Result: {{: | ||
* More information on css and css tweaking of the plugin in the **Advanced Features** section below. | * More information on css and css tweaking of the plugin in the **Advanced Features** section below. | ||
Line 67: | Line 73: | ||
If None of the tags are detected in the result of the command, the plugin reverts to its original behavior (displaying the result of the command). | If None of the tags are detected in the result of the command, the plugin reverts to its original behavior (displaying the result of the command). | ||
- | **Example Script (cpu temperature)** | + | **Example Script (system stats)** |
- | Here's a simple | + | Here is an example of a genmon |
- | (with an icon) and the Freq in a Tooltip: | + | <file sh systemstats.sh> |
- | <file sh cuptemp.sh> | + | #!/bin/sh |
- | # | + | |
- | echo "< | + | |
- | declare -i cpuFreq | + | |
- | cpuFreq=$(cat / | + | |
- | if [ $cpuFreq -ge 1000 ] | + | |
- | then | + | |
- | cpu=$(echo $cpuFreq | cut -c1).$(echo $cpuFreq | cut -c2)GHz | + | |
- | else | + | |
- | cpu=${cpuFreq}MHz | + | |
- | fi | + | |
- | echo "<txt>"$(cat / | + | |
- | echo "< | + | |
- | </file> | + | |
- | PS: Depending on your configuration, | + | ICON=utilities-system-monitor |
+ | PARTITION=sda2 | ||
- | **Another Example Script | + | # get CPU info |
+ | CPU=$(cat <(grep 'cpu ' /proc/stat) <(sleep 1 && grep 'cpu ' /proc/stat) | awk -v RS="" | ||
+ | CPULOAD=$(uptime | tr -s " " | cut -d' ' -f9-) | ||
+ | TOPCPU=$(ps aux --no-headers | awk ' | ||
- | Here's a another simple example of a plugin displaying the keyboard LED states of the caps, num and scroll lock keys: | + | # get memory info |
- | <file sh kbdleds.sh> | + | MEMTOT=$(cat / |
- | #!/bin/bash | + | MEMAVA=$(cat / |
- | # genmon script to display status of keyboard LEDS | + | MEMUSAGE=$(free | grep Mem | awk ' |
- | # genmon properties: | + | MEMUSAGE2=$(echo " |
- | # | + | MEMUSED=$(echo " |
- | # Label = optional Label preceeding output | + | TOPMEM=$(ps aux --no-headers | awk ' |
- | # | + | |
- | # | + | # get hard drive usage info |
+ | HD=$(df -hl / | ||
+ | HDUSED=$(df -hl / | ||
+ | HDSIZE=$(df -hl / | ||
+ | TOPHD=$(df -hl / | ||
- | # configuration | + | # do the genmon |
- | FG="white" | + | echo "< |
- | OBC="red" | + | echo "<txt> $CPU | $MEMUSAGE | $HD </ |
+ | echo "< | ||
+ | $TOPCPU | ||
- | # code | + | -=MEM: $MEMUSED of $MEMUSAGE2=- |
- | STATE=($(xset q | grep Caps\ Lock | awk ' | + | $TOPMEM |
- | CAPS=$([[ ${STATE[0]} == " | + | |
- | NUM=$([[ ${STATE[1]} == " | + | |
- | SCROLL=$([[ ${STATE[2]} == " | + | |
- | # genmon | + | -=HD usage: |
- | echo "< | + | $TOPHD</ |
- | echo "< | + | |
- | echo "NUM = ${STATE[1]}" | + | |
- | echo " | + | |
exit 0 | exit 0 | ||
</ | </ | ||
+ | |||
+ | {{: | ||
< | < | ||
+ | |||
+ | Additional genmon scripts can be found in the following online repositories (special thanks to the individual developers for creating them): | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
[[|Back To Top]] | [[|Back To Top]] | ||
Line 127: | Line 133: | ||
**Pango Text Markup Support** | **Pango Text Markup Support** | ||
- | Both the <txt> and < | + | Both the <txt> and < |
echo "< | echo "< | ||
Line 137: | Line 143: | ||
**Refreshing the plugin** | **Refreshing the plugin** | ||
- | The xfce4-genmon-plugin supports xfce4-panel plugin-event functionality to remotely force the plugin to refresh. To refresh the plugin, issue the command: | + | As of version 3.99, the xfce4-genmon-plugin supports xfce4-panel plugin-event functionality to remotely force the plugin to refresh. To refresh the plugin, issue the command: |
xfce4-panel --plugin-event=genmon-X: | xfce4-panel --plugin-event=genmon-X: | ||
where " | where " | ||
- | As of version 4.2.0, | + | As of version 4.2.0, an " |
- | {{: | + | {{: |
**Enhanced Gtk3 CSS Styling Capabilities** | **Enhanced Gtk3 CSS Styling Capabilities** | ||
- | CSS styling capabilities have been enhanced by providing style classes for all elements of the plugin that can be styled via themes or individual overrides (~/ | + | As of version 4.0.1, |
- | As of version 4.2.0, this plugin also supports CSS tags (special thanks to @stergem) that allow you to tweak the plugin css directly from within the command/ | + | And as of version 4.2.0, this plugin also supports CSS tags (special thanks to @stergem) that allow you to tweak the plugin css directly from within the command/ |
<file genmonTest.sh> | <file genmonTest.sh> | ||
#!/bin/bash | #!/bin/bash | ||
Line 167: | Line 173: | ||
===== Screenshots ===== | ===== Screenshots ===== | ||
- | {{: | ||
- | In ^this^ example, the plugin is used to (from left to right): | + | Configuration/Properties screen: |
- | - display the date | + | |
- | - mount/unmount an USB disk with 1 click | + | |
- | - display the CPU temperature (and the frequency in the tooltip) | + | |
- | - display the HD temperature | + | |
- | - display the state of the 2 batteries of my laptop | + | |
- | - display the WIFI quality | + | |
+ | {{: | ||
- | {{:panel-plugins: | + | About screen: |
- | In ^this^ example, we see the gmail checker script in action: | + | {{:panel-plugins: |
- | | + | |
- | | + | |
- | | + | |
- | |||
- | |||
- | {{: | ||
- | |||
- | In ^this^ example, we see the sysstat script in action: | ||
- | - plugin display shows optional icon and 3 readings (cpu, memory, hard drive usage) | ||
- | - tooltip shows top 5 cpu and memory uses and hard drive space usage | ||
- | - clicking on the text output launches xfce4-taskmanager (//ver. 3.99 or greater//) | ||
- | |||
- | |||
- | |||
- | {{: | ||
- | |||
- | In ^this^ example, we see the google calendar checker script in action: | ||
- | - plugin display shows icon indicating state of new upcoming appointments | ||
- | - tooltip shows a listing of upcoming appointments | ||
- | - clicking on the icon opens google calendar in your browser | ||
- | |||
- | |||
- | |||
- | Most of the scripts are available in the plugin archive. | ||
[[|Back To Top]] | [[|Back To Top]] | ||
Line 212: | Line 188: | ||
===== Latest Release ===== | ===== Latest Release ===== | ||
- | {{rss> | ||
- | | + | {{rss> |
+ | |||
+ | [[https:// | ||
+ | |||
+ | | ||
[[|Back to Top]] | [[|Back to Top]] | ||
---- | ---- | ||
+ | |||
===== Source code repository ===== | ===== Source code repository ===== | ||
+ | |||
[[https:// | [[https:// | ||
+ | |||
---- | ---- | ||
+ | |||
===== Reporting Bugs ===== | ===== Reporting Bugs ===== | ||
+ | |||
* **[[: | * **[[: | ||